package cn.wolfcode.p2p.website.controller;

import cn.wolfcode.p2p.bussness.service.IBidRequestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;


@Controller
public class MainController {
    @Autowired
    private IBidRequestService bidRequestService;
    @RequestMapping("/main")
    public String mainPage(Model model){
        model.addAttribute("publishPendngBidRequests",bidRequestService.queryPublishPendngBidRrequests());
        model.addAttribute("bidRequests",bidRequestService.queryIndexData());
        return "main";
    }
}
